﻿
@{
    ViewBag.Title = "EmployeePageList";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}
@section css{
    <link rel="stylesheet" href="~/assets/portal/assets/css/common.css" />
    <link rel="stylesheet" href="~/bussiness/js/base/reset.css" />
    <style>
        .iTitle {
            font-weight: 600;
            font-size: 16px;
            display: flex;
            width: 100%;
            align-items: center;
            margin-left: 20px;
        }
        .ant-select-arrow, .ant-select-clear {
            position: absolute;
            right: 10px;
        }
            .iTitle::before {
                content: "";
                margin-right: 10px;
                display: inline-block;
                width: 4px;
                height: 20px;
                background: #0064e5;
            }
    </style>
}
<div id="PerformanceAddPlan" class="font-['SourceHanSansSC']">
    <a-style-provider hash-priority="high">
        <a-config-provider :locale="vlocale">


            <header class="px-5 box-border ">
                <a-modal v-model:open="PerformanceAddPlanParams.popOpen.value" title="温馨提示" v-on:ok="handleOk">
                    <p>确定删除此数据？</p>
                </a-modal>
                <a-image :width="200"
                         :style="{ display: 'none',zIndex:100 }"
                         :preview="{visible:PerformanceAddPlanParams.previewShow.value,onVisibleChange:PerformanceAddPlanParams.setVisible}" :src="PerformanceAddPlanParams.imgUrl.value"></a-image>

                <m-pdf-pop-model></m-pdf-pop-model>
                <div class="flex items-center">
                    <div class="w-full h-[48px] text-[13px]  rounded-lg mx-auto my-[10px]  bg-white  text-[#888888] text-3xl flex items-center px-10">   <div class="w-22 h-22 bg-blue-200 mr-5"> <img class="w-full h-full cursor-pointer" v-on:click="PerformanceAddPlanParams.vvback()" src="~/Assets/nimgs/exit.png" alt="返回" /></div> <span class="text-[]">首页<span class="mx-2">/</span>履职考核<span class="mx-2">/</span><span class="text-[#424758] text-[15px]">新增考核计划</span> </span>  </div>
                </div>
                <div class="w-full relative">

                    <a-card :bordered="true" class="w-full  mt-5 px-15">
                        <template #title>
                            <div class="w-full flex justify-between items-center">
                                <div class="flex items-center"> <div>考核计划通知</div></div>

                            </div>
                        </template>

                        <a-steps :current="PerformanceAddPlanParams.current.value" type="navigation" :items="PerformanceAddPlanParams.items.value"></a-steps>
                        <div v-if="PerformanceAddPlanParams.current.value==0">
                            <a-form :model="PerformanceAddPlanParams.s1Form.value"
                                    :label-col="{ span: 4 }"
                                    ref="s1FormRule"
                                    :rules="PerformanceAddPlanParams.s1FormRule.value"
                                    :wrapper-col="{ span: 20 }">
                                <a-row class="mt-10">
                                    <a-col :span="10">
                                        <a-form-item label="计划类型"
                                                     name="TypeId">
                                            <a-checkbox-group v-model:value="PerformanceAddPlanParams.s1Form.value.TypeId" :options="PerformanceAddPlanParams.planTypeList.value" />
                                        </a-form-item>
                                    </a-col>
                                    <a-col :span="2"></a-col>
                                    <a-col :span="10">

                                    </a-col>

                                </a-row>
                                <a-row>

                                    <a-col :span="10">
                                        <a-form-item label="受审核部门"
                                                     name="DepartmentId">
                                            <a-select v-model:value="PerformanceAddPlanParams.s1Form.value.DepartmentId"
                                                      :options="PerformanceAddPlanParams.deptList.value" mode="multiple" :filter-option="PerformanceAddPlanParams.filterOption" placeholder="请选择受审核部门"></a-select>
                                        </a-form-item>
                                    </a-col>
                                    <a-col :span="2">
                                        <a-button style="margin-left:10px" type="primary" v-on:click="PerformanceAddPlanParams.chooseAll">{{PerformanceAddPlanParams.isChooseAll.value?'取消勾选':'全部勾选'}}</a-button>

                                    </a-col>
                                    <a-col :span="10">

                                    </a-col>

                                </a-row>
                                <a-row>
                                    <a-col :span="10">
                                        <a-form-item label="办公地址"
                                                     name="WorkAddress">
                                            <a-input placeholder="请填写办公地址" v-model:value="PerformanceAddPlanParams.s1Form.value.WorkAddress" />
                                        </a-form-item>
                                    </a-col>
                                    <a-col :span="2"></a-col>
                                    <a-col :span="10">
                                        <a-form-item label="生产地址"
                                                     name="ProductAddress"
                                                     :rules="[{ required: true, message: '请填写生产地址' }]">
                                            <a-input placeholder="请填写生产地址" v-model:value="PerformanceAddPlanParams.s1Form.value.ProductAddress" />
                                        </a-form-item>
                                    </a-col>
                                </a-row>
                                <a-row>
                                    <a-col :span="10">

                                        <a-form-item label="审核目的"
                                                     name="TargetId">

                                            <a-radio-group v-model:value="PerformanceAddPlanParams.s1Form.value.TargetId">
                                                <template v-for="e in PerformanceAddPlanParams.aimList.value">
                                                    <a-radio v-bind:value="e.value">{{e.label}}<a-input :bordered="false" :disabled="PerformanceAddPlanParams.s1Form.value.TargetId!=e.value" v-if="e.IsInput" v-model:value="PerformanceAddPlanParams.s1Form.value.OtherTarget" style="width: 100px;border-radius:0; border-bottom: 1px solid black; margin-left: 10px"></a-input></a-radio>
                                                </template>

                                            </a-radio-group>
                                        </a-form-item>
                                    </a-col>
                                    <a-col :span="2"></a-col>
                                    <a-col :span="6">

                                    </a-col>
                                </a-row>
                                <a-row>

                                    <a-col :span="10">
                                        <a-form-item label="审核日期"
                                                     name="AllTime">
                                            <a-range-picker v-model:value="PerformanceAddPlanParams.s1Form.value.AllTime" v-on:change="PerformanceAddPlanParams.dateChange" :format="['YYYY-MM-DD', 'YYYY-MM-DD']" />
                                        </a-form-item>
                                    </a-col>
                                    <a-col :span="2"></a-col>
                                    <a-col :span="10">
              
                                    </a-col>
                                </a-row>
                                <a-row>

                                    <a-col :span="10">

                                        <a-form-item label="审核准则"
                                                     name="GuideLine"
                                                     :rules="[{ required: true, message: '请选择审核准则' }]">
                                            <a-checkbox-group v-model:value="PerformanceAddPlanParams.s1Form.value.GuideLine">
                                                <template v-for="e in PerformanceAddPlanParams.rules.value">
                                                    <a-checkbox v-bind:value="e.value">{{e.label}}<a-input v-model:value="PerformanceAddPlanParams.s1Form.value.OtherGuideLine" v-if="e.IsInput" :bordered="false" :disabled="PerformanceAddPlanParams.s1Form.value.GuideLine&&!PerformanceAddPlanParams.s1Form.value.GuideLine.includes(e.value)" style="width: 100px; border-radius: 0; height: 22px; border-bottom: 1px solid black; margin-left: 10px" /></a-checkbox>
                                                </template>

                                            </a-checkbox-group>
                                        </a-form-item>
                                    </a-col>
                                    <a-col :span="2"></a-col>
                                    <a-col :span="6">

                                    </a-col>

                                </a-row>
                                <a-row>

                                    <a-col :span="10">
                                        <a-form-item label="方案管理人员"
                                                     name="CaseManager">

                                            <a-select placeholder="请选择方案管理人员" v-on:change="PerformanceAddPlanParams.memberChoose" v-model:value="PerformanceAddPlanParams.s1Form.value.CaseManager"
                                                      :options="PerformanceAddPlanParams.memberList.value"></a-select>

                                        </a-form-item>
                                    </a-col>
                                    <a-col :span="2"></a-col>
                                    <a-col :span="6">

                                    </a-col>

                                </a-row>
                                <a-row>

                                    <a-col :span="10">
                                        <a-form-item v-if="PerformanceAddPlanParams.s1Form.value.CaseManager" label="电话">
                                            <a-input disabled v-model:value="PerformanceAddPlanParams.tel.value" placeholder="暂无数据" />
                                        </a-form-item>
                                    </a-col>
                                    <a-col :span="2"></a-col>
                                    <a-col :span="10">
                                        <a-form-item v-if="PerformanceAddPlanParams.s1Form.value.CaseManager" label="邮箱">
                                            <a-input disabled v-model:value="PerformanceAddPlanParams.email.value" placeholder="暂无数据" />
                                        </a-form-item>
                                    </a-col>

                                </a-row>
                                <a-row class="mt-10">
                                    <a-col :span="10">
                                        <a-form-item label="备注"
                                                     name="title">
                                            <a-textarea v-model:value="PerformanceAddPlanParams.s1Form.value.Remark"
                                                        placeholder="请输入备注"
                                                        :auto-size="{ minRows: 2, maxRows: 5 }" />
                                        </a-form-item>
                                    </a-col>

                                </a-row>
                                <a-row>

                                    <a-col :span="10">
                                        <a-form-item label="附件">
                                            <a-upload-dragger v-model:file-list="PerformanceAddPlanParams.fileList.value"
                                                              :item-render="PerformanceAddPlanParams.itemRender.value"
                                                              :custom-request="()=>{}"
                                                              v-on:change="PerformanceAddPlanParams.handleChange"
                                                              v-on:drop="PerformanceAddPlanParams.handleDrop">

                                                <p class="ant-upload-text">单击或拖动文件到此区域进行上传</p>
                                                <p class="ant-upload-hint">
                                                    支持单个或批量上传
                                                </p>
                                            </a-upload-dragger>
                                        </a-form-item>
                                    </a-col>

                                </a-row>
                            </a-form>
                        </div>
                        <div v-else-if="PerformanceAddPlanParams.current.value==1">


                            <a-form :model="PerformanceAddPlanParams.groupList.value"
                                    :label-col="{ span: 4 }"
                                    :wrapper-col="{ span: 20 }"
                                    autocomplete="off">

                                <template v-for="(e,i) in PerformanceAddPlanParams.groupList.value">

                                    <a-row class="mt-10">
                                        <a-col :span="10">


                                            <a-form-item label="审核组名称">
                                                <a-input v-model:value="e.TeamName" placeholder="审核组名称" />
                                            </a-form-item>



                                        </a-col>
                                        <a-col :span="2">
                                            <a-row v-if="i==PerformanceAddPlanParams.groupList.value.length-1"><div style="width:100%;display:flex;justify-content:flex-end"><a-button v-on:click="PerformanceAddPlanParams.addGroup" type="primary">新增</a-button></div></a-row>
                                            <a-row v-else><div style="width:100%;display:flex;justify-content:flex-end"><a-button v-on:click="PerformanceAddPlanParams.delGroup(i,e)" type="primary" danger>删除</a-button></div></a-row>
                                        </a-col>
                                        <a-col :span="10">

                                        </a-col>
                                    </a-row>


                                    <div v-for="(es,is) in e.MemberList" style="padding: 20px; background: #f4f4f4; border-radius: 4px">

                                        <a-row v-if="is==e.MemberList.length-1"><div style="width:100%;display:flex;justify-content:flex-end"><a-button v-on:click="PerformanceAddPlanParams.addGroupInfo(i)" type="primary">新增</a-button></div></a-row>
                                        <a-row v-else><div style="width:100%;display:flex;justify-content:flex-end"><a-button v-on:click="PerformanceAddPlanParams.delGroupInfo(i,is,e,es)" type="primary" danger>删除</a-button></div></a-row>
                                        <a-row>
                                            <a-col :span="10">
                                                <a-form-item label="成员姓名">

                                                    <a-select placeholder="请选择成员" v-on:click="PerformanceAddPlanParams.test(i,is)" v-on:change="PerformanceAddPlanParams.gmemberChoose1" v-model:value="es.pname"
                                                              :options="PerformanceAddPlanParams.memberList.value"></a-select>


                                                </a-form-item>
                                            </a-col>
                                            <a-col :span="2"></a-col>
                                            <a-col :span="10">
                                                <a-form-item label="成员角色">
                                                    <a-input disabled v-model:value="es.prule" placeholder="暂无数据" />
                                                </a-form-item>
                                            </a-col>
                                        </a-row>
                                        <a-row>
                                            <a-col :span="10">
                                                <a-form-item label="成员职务">
                                                    <a-input disabled v-model:value="es.pduty" placeholder="暂无数据" />
                                                </a-form-item>
                                            </a-col>
                                            <a-col :span="2"></a-col>
                                            <a-col :span="10">
                                                <a-form-item label="联系电话">
                                                    <a-input disabled v-model:value="es.ptel" placeholder="暂无数据" />
                                                </a-form-item>
                                            </a-col>
                                        </a-row>
                                    </div>
                                </template>
                            </a-form>
                        </div>
                        <div v-else-if="PerformanceAddPlanParams.current.value==2">
                            <a-form :model="PerformanceAddPlanParams.s3Form.value"
                                    :label-col="{ span: 4 }"
                                    :wrapper-col="{ span: 20 }"
                                    autocomplete="off">
                                <template v-for="(e,i) in PerformanceAddPlanParams.dateList.value">
                                    <a-row v-if="i==0"><div style="width:100%;margin-top:20px; display:flex;justify-content:flex-end"><a-button v-on:click="PerformanceAddPlanParams.addDate" type="primary">新增</a-button></div></a-row>
                                    <a-row v-else><div style="width:100%;display:flex;justify-content:flex-end"><a-button v-on:click="PerformanceAddPlanParams.delDate(i,e)" type="primary" danger>删除</a-button></div></a-row>
                                    <a-row class="mt-10">
                                        <a-col :span="10">
                                            <a-form-item label="日期时间"
                                                         :rules="[{ required: true, message: '请选择日期时间' }]">
                                                <a-range-picker v-on:click="PerformanceAddPlanParams.test(i)" v-model:value="e.AllTime" show-time v-on:change="PerformanceAddPlanParams.dateChange1" />
                                            </a-form-item>
                                        </a-col>
                                        <a-col :span="2"></a-col>
                                        <a-col :span="10">
                                            <a-form-item label="受审核部门"
                                                         :rules="[{ required: true, message: '请选择受审核部门' }]">
                                                <a-select placeholder="请选择受审核部门" v-model:value="e.DepartmentId"
                                                          :options="PerformanceAddPlanParams.beCheckDeptList.value"></a-select>
                                            </a-form-item>
                                        </a-col>
                                    </a-row>







                                    <a-row>
                                        <a-col :span="10">


                                            <a-form-item label="审核组"
                                                         :rules="[ { required: true, message: '请选择审核组' }]">

                                                <a-select placeholder="请选择审核组" v-on:click="PerformanceAddPlanParams.test(i)" v-on:change="PerformanceAddPlanParams.gmemberChoose2" v-model:value="e.TeamId"
                                                          :options="PerformanceAddPlanParams.sgroupList.value"></a-select>
                                            </a-form-item>
                                        </a-col>
                                        <a-col :span="2"></a-col>
                                        <a-col :span="10">
                                            <a-form-item label="审核员"
                                                         name="gmember"
                                                         :rules="[{ required: true, message: '请选择审核组' }]">
                                                <a-input disabled v-model:value="e.gmember" placeholder="请选择审核组" />
                                            </a-form-item>
                                        </a-col>
                                    </a-row>


                                    <a-row>
                                        <a-col :span="10">

                                            <a-form-item label="重点审核要素"
                                                         :rules="[{ required: true, message: '请填写重点审核要素' }]">
                                                <a-textarea v-model:value="e.Factor"
                                                            placeholder="请填写重点审核要素"
                                                            :auto-size="{ minRows: 3, maxRows: 5 }" />
                                            </a-form-item>
                                        </a-col>
                                        <a-col :span="2"></a-col>
                                        <a-col :span="10">

                                        </a-col>
                                    </a-row>

                                </template>
                            </a-form>
                        </div>
                        <div v-else-if="PerformanceAddPlanParams.current.value==3">
                            <a-form :model="PerformanceAddPlanParams.s4Form.value"
                                    :label-col="{ span: 4 }"
                                    ref="s4FormRule"
                                    :wrapper-col="{ span: 20 }"
                                    :rules="PerformanceAddPlanParams.s4FormRule.value"
                                    autocomplete="off">
                                <a-row class="mt-10">
                                    <a-col :span="10">
                                        <a-form-item label="审核名称"
                                                     name="Title">
                                            <a-input placeholder="请输入审核名称" v-model:value="PerformanceAddPlanParams.s4Form.value.Title" />
                                        </a-form-item>
                                    </a-col>
                                    <a-col :span="2"></a-col>
                                    <a-col :span="10">

                                    </a-col>
                                </a-row>


                                <a-row>

                                    <a-col :span="10">
                                        <a-form-item label="受审部门">
                                            <a-textarea disabled v-model:value="PerformanceAddPlanParams.s4Form.value.dept"
                                                        :auto-size="{ minRows: 2, maxRows: 15 }" />
                                        </a-form-item>
                                    </a-col>
                                    <a-col :span="2"></a-col>
                                    <a-col :span="10">

                                    </a-col>

                                </a-row>


                                <a-row>

                                    <a-col :span="10">
                                        <a-form-item label="通知内容"
                                                     name="Content">
                                            <a-textarea v-model:value="PerformanceAddPlanParams.s4Form.value.Content"
                                                        placeholder="请输入通知内容"
                                                        :auto-size="{ minRows: 5, maxRows: 10 }" />
                                        </a-form-item>
                                    </a-col>
                                    <a-col :span="2"></a-col>
                                    <a-col :span="10">

                                    </a-col>

                                </a-row>

                            </a-form>

                        </div>

                        <div v-else>
                            <a-result status="success"
                                      title="提交成功"
                                      sub-title="处理中请稍等">
                                <template #extra>

                                </template>
                            </a-result>
                        </div>
                    </a-card>
                    <div style="display:flex;justify-content:flex-end;width:100%;margin-top:10px">
                        <a-space>

                            <a-button v-if="PerformanceAddPlanParams.current.value < PerformanceAddPlanParams.items.value.length - 1||PerformanceAddPlanParams.current.value == PerformanceAddPlanParams.items.value.length - 1" style="background: #5cdf63;color:white" v-on:click="PerformanceAddPlanParams.save">保存</a-button>
                            <a-button v-if="PerformanceAddPlanParams.current.value < PerformanceAddPlanParams.items.value.length - 1" type="primary" v-on:click="PerformanceAddPlanParams.next">下一步</a-button>
                            <a-button v-if="PerformanceAddPlanParams.current.value == PerformanceAddPlanParams.items.value.length - 1"
                                      v-on:click="PerformanceAddPlanParams.next" type="primary">
                                完成
                            </a-button>
                            <a-button v-if="PerformanceAddPlanParams.current.value!=0&&PerformanceAddPlanParams.current.value < PerformanceAddPlanParams.items.value.length - 1||PerformanceAddPlanParams.current.value == PerformanceAddPlanParams.items.value.length - 1" style="margin-left: 8px" v-on:click="PerformanceAddPlanParams.prev">上一步</a-button>
                            <a-button v-on:click="PerformanceAddPlanParams.onBack">返回</a-button>
                        </a-space>
                    </div>

                </div>
            </header>
        </a-config-provider>
        </a-style-provider>
</div>
@section Js{
    <script src="~/bussiness/js/base/tailwind.js"></script>
    <script type="module">
        import Composition from '../../bussiness/js/pg/Performance/addPlan.js?v=@DateTime.Now.ToString("yyyyMMddHHmm")'
        import localeValues from '../../Bussiness/js/base/es/locale/zh_CN.js'
        singalApp('PerformanceAddPlan', Composition, localeValues)
    </script>
}
